<template >
<h2>父组件接受的数据是:</h2>
<pre>{{ parMsg }}</pre>
<p>{{ parMsg.text }}</p>
<p>{{ parMsg.count }}</p>
<div>
    <emit-child @updateMsg="upMsg"></emit-child>
</div>

</template>
<script setup>
import { ref } from 'vue';
import EmitChild from './EmitChild.vue';
let parMsg = ref('');
const upMsg=(msg)=>{
parMsg.value = msg;
}


</script>
<style scoped>
p{
    color: brown;
}
:deep(.dee){
background-color: cadetblue;
width: 100px;
height: 100px;
}

</style>